The build-toolbox job only runs for main and stable branches, so
we currently only know whether modifications to the build-toolbox
script actually work once they a merged.
To catch errors up-front, do test builds of the toolbox image
when a merge request modifies the build script.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3875>
stage: deploy
needs: []
script:
- - .gitlab-ci/build-toolbox-image.sh $MUTTER_CI_IMAGE
+ - .gitlab-ci/build-toolbox-image.sh $MUTTER_CI_IMAGE $MUTTER_BRANCH
build-toolbox:
extends:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "GNOME"'
- if: '$CI_COMMIT_BRANCH =~ /^gnome-[0-9-]+$/ && $CI_PROJECT_NAMESPACE == "GNOME"'
+
+test-build-toolbox:
+ extends:
+ .build-toolbox
+ variables:
+ MUTTER_BRANCH: "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
+ FORCE_REBUILD: 1
+ DRY_RUN: 1
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ changes:
+ - ".gitlab-ci/build-toolbox-image.sh"